/*流程图只读模式右上角3个按钮 */
import { Button } from "antd";
import { useForm } from "../../framework/common/context/metadata-context";
import { getQuery, openWin } from "../../framework/common/utils";
import CirculateRecords from "../CirculateRecords";
import FileRecords from "../FileRecords";

export default function () {
  const { params, data: tplData, urlPrefix } = useForm();
  //debugger;
  return (
    <>
      {/* 展示流程图 */}
      {tplData.StepInfo.view_flow_chart && (
         <Button className="float-right" onClick={()=>{
          openWin(`${urlPrefix}/flowinstance/flow-map/index${getQuery("string")}`)
         }}  type="link">
         流程图
       </Button>
      )}
      {/* 展示传阅和附件记录 */}
      {!params.ParentProcess && tplData.NodeInfo.node_id && (
        <>
          <CirculateRecords></CirculateRecords>
          <FileRecords></FileRecords>
        </>
      )}
    </>
  );
}
